export const PARAMS_SIGN = [
    {
        type: "a-input",
        field: "name",
        title: "姓名",
        value: "",
        props: {placeholder:"请输入姓名"}
    },
    {
        type: "a-input",
        field: "idCard",
        title: "身份证号码",
        value: "",
        props: {placeholder:"请输入身份证号码"}
    },
    {
        type: "a-input",
        field: "phone",
        title: "手机号码",
        value: "",
        props: { placeholder: "请输入手机号码",maxLength: 11 },
        validate: [
            {
            validator: (rule, val, d) => {
                val && !/^1(3[0-9]|4[0-9]|5[0-9]|6[0-9]|7[0-9]|8[0-9]|9[0-9])\d{8}$/.test(val) ? d(true) : d();
            },
            message: "手机格式错误"
            }
        ]
    },
    {
        type: "a-input",
        field: "enterpriseName",
        title: "企业名称",
        value: "",
        props: {placeholder:"请输入企业"}
    },
    {
        type: "a-input",
        field: "source",
        title: "园区名称",
        value: "",
        props: {placeholder:"请输入公司名称"}
    },
    {
        type: "select",
        field: "hasidCar",
        title: "身份证是否上传",
        value: "",
        options:[{value:'',label:'全部'},{value:1,label:'是'},{value:2,label:'否'}],
        props: {placeholder:"请选择身份证是否上传"}
    },
    {
        type: "select",
        field: "state",
        title: "签约状态",
        value: "",
        options:[{value:'',label:'全部'},{value:1,label:'未签约'},{value:2,label:'已签约'},{value:3,label:'待签约'},{value:4,label:'签约失败'}],
        props: {placeholder:"请选择签约状态"}
    },
    {
        type: "select",
        field: "expire",
        title: "到期状态",
        value: "",
        options:[{value:'',label:'全部'},{value:1,label:'已到期'},{value:2,label:'即将到期'}],
        props: {placeholder:"请选择到期状态"}
    },
    {
        type: "a-range-picker",
        field: "day",
        title: "签约日期",
        value: [],
        props: {
            valueFormat:"YYYY-MM-DD"
        }
    },
    {
        type: "select",
        field: "type",
        title: "签约方式",
        value: "",
        col:{span:8},
        options: [{value:'',label:'全部'},{value:2,label:'短信签约'},{value:3,label:'小程序签约'},{value:4,label:'线下签约'}],
        props: {placeholder:"请选择签约状态"}
    },
    {
      type:'a-button',
      field:'search',
      props:{
          type:'primary',
          icon:"search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'a-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
]

export const COLUMNS_SIGN = [
    {
        title: '姓名',
        dataIndex: 'name',
        width:100
    },
    {
        title: '身份证号码',
        dataIndex: 'idCard',
        scopedSlots: { customRender: 'idCard' },
        width:120
    },
    {
        title: '手机号码',
        dataIndex: 'phone',
        scopedSlots: { customRender: 'phone' },
        width:100
    },
     {
        title: '上传签约方',
         dataIndex: 'soueceName',
        scopedSlots: { customRender: 'soueceName' },
        width:120
    },
    {
        title: '企业名称',
        dataIndex: 'enterName',
        scopedSlots: { customRender: 'enterName' },
        width:140
    },
    {
        title: '签约园区名称',
        dataIndex: 'parkName',
        scopedSlots: { customRender: 'parkName' },
        width:140
    },
    {
        title: '创建日期',
        dataIndex: 'createdTime',
        width:180
    },
    {
        title: '签约日期',
        dataIndex: 'signedTime',
        width:180
    },
    {
        title: '失效日期',
        dataIndex: 'signedOverdueTime',
        width:180
    },
    {
        title: '签约方式',
        dataIndex: 'type',
        customRender: (text, row, index) => {
            if (row.type === 1) {
                return '--'
            } else if (row.type === 2){
                return '短信签约'
            } else if (row.type === 3){
                return '小程序签约'
            } else if (row.type === 4){
                return '线下签约'
            }
            return '--'
        },
    },
    {
        title: '合同类型',
        dataIndex: 'tempType',
    },
    {
        title: '实名状态',
        dataIndex: 'authentication',
        customRender: (text, row, index) => {
            if (row.idCardFront) {
                return '已小程序实名认证'
            } else{
                return '已短信实名认证'
            }
            return '--'
        },
    },
     {
        title: '签约状态',
         dataIndex: 'status',
         customRender: (text, row, index) => {
            if (row.status === 1) {
                return '未签约'
            } else if (row.status === 2){
                return '已签约'
            } else if (row.status === 3){
                return '待签约'
            } else if (row.status === 4){
                return '签约失败'
            }
            return '未签约'
        },
    },
      {
        title: '签约文件',
         dataIndex: 'pactUrl',
         scopedSlots: { customRender: 'pactUrl' }
    },
     {
        title: '身份证照片',
         dataIndex: 'idCardFront',
         scopedSlots: { customRender: 'idCardFront' },
         width:160
    },
    {
        title: '操作',
        dataIndex: 'action',
        scopedSlots: { customRender: 'action' },
         fixed: 'right',
    }
]

export const COLUMNS_SIGN_USER = [
    {
        title: '姓名',
        dataIndex: 'name',
        width: 90
    },
    {
        title: '身份证号码',
        dataIndex: 'idCard',
        scopedSlots: { customRender: 'idCard' },
        width: 120
    },
    {
        title: '手机号码',
        dataIndex: 'phone',
        width: 130
    },
    {
        title: '认证状态',
        dataIndex: 'errorType',
        scopedSlots: { customRender: 'errorType' },
         width: 200
    },
    {
        title: '历史签约状态',
        dataIndex: 'remark',
         width: 200
    },
    {
        title: '操作',
        dataIndex: 'action',
        width: 120,
        scopedSlots: { customRender: 'action' }
    }
]

export const COLUMNS_SIGN_TASK_RECORD = [
    {
        title: '任务编号',
        dataIndex: 'taskId',
    },
    {
        title: '任务名称',
        dataIndex: 'taskName',
    },
    {
        title: '任务类型',
        dataIndex: 'type',
        customRender: (text, row, index) => {
            if(row.type === 1) {
                return '线上'
            }else if (row.type === 2){
                return '线下'
            }
            return ''
        }
    },
    {
        title: '园区服务商',
        dataIndex: 'parkName',
    },
    {
        title: '来源企业',
        dataIndex: 'enterpriseName',
    },
    {
        title: '发布时间',
        dataIndex: 'publishTime',
    },
    {
        title: '操作',
        dataIndex: 'action',
        scopedSlots: { customRender: 'action' },
        fixed: 'right'
    }
]

export const COLUMNS_SIGN_RECORD = [
    {
        title: '合同类型',
        dataIndex: 'tempName',
    },
    {
        title: '签约日期',
        dataIndex: 'signedTime',
    },
    {
        title: '失效日期',
        dataIndex: 'signedOverdueTime',
    },
    {
        title: '园区服务商',
        dataIndex: 'parkName',
    },
    {
        title: '签约方式',
        dataIndex: 'type',
        customRender: (text, row, index) => {
            if(row.type === 1){
                return '--';
            }else if(row.type === 2){
                return '短信签约';
            }else if(row.type === 3){
                return '小程序签约';
            }else if(row.type === 4){
                return '线下签约';
            }
            return '--'
        }
    },
    {
        title: '签约状态',
        dataIndex: 'status',
        customRender: (text, row, index) => {
            if(row.status === 1){
                return '未签约';
            }else if(row.status === 2){
                return '已签约';
            }else if(row.status === 3){
                return '待签约';
            }else if(row.status === 4){
                return '签约失败';
            }
            return '未签约'
        }
    }
]


export const COLUMNS_SIGN_SETT_RECORD = [
    {
        title: '姓名',
        dataIndex: 'userName',
    },
    {
        title: '批次编号',
        dataIndex: 'settleBatchCode',
    },
    {
        title: '结算批次名称',
        dataIndex: 'settleBatchName',
    },
    {
        title: '任务类型',
        dataIndex: 'type',
        customRender: (text, row, index) => {
            if(row.type === 1) {
                return '线上'
            }else if (row.type === 2){
                return '线下'
            }
            return ''
        }
    },
    {
        title: '结算方式',
         dataIndex: 'serviceFeeCalculateMode',
        customRender: (text, row, index) => {
            if (row.serviceFeeCalculateMode === 1) {
                return '正算'
            } else if (row.serviceFeeCalculateMode === 2){
                return '倒扣'
            }
         },
    },
    {
        title: '任务名称',
        dataIndex: 'taskName',
    },
    {
        title: '任务编号',
        dataIndex: 'taskId',
    },
    {
        title: '园区服务商',
        dataIndex: 'parkName',
    },
    {
        title: '来源企业',
        dataIndex: 'enterpriseName',
    },
    {
        title: '支付通道',
        dataIndex: 'payChannel',
        customRender: (text, row, index) => {
            if(row.payChannel === 1) {
                return '招商银行'
            }else if (row.payChannel === 3){
                return '支付宝到卡'
            }else if (row.payChannel === 4){
                return '支付宝到户'
            }
         },
    },
    {
        title: '结算金额',
        dataIndex: 'settleAmount',
    },
    {
        title: '结算时间',
        dataIndex: 'createdTime',
    },
    {
        title: '结算状态',
        dataIndex: 'settleStatus',
        customRender: (text, row, index) => {
            if(row.settleStatus === 1) {
                return '待审核'
            }else if (row.settleStatus === 2){
                return '结算中'
            }else if (row.settleStatus === 3){
                return '结算成功'
            }else if (row.settleStatus === 5){
                return '结算失败'
            }else if (row.settleStatus === 6){
                return '已驳回'
            }
         },
    }
]
 
export const OPTION_INLINE = {
    form: {layout: 'inline'},
    resetBtn: false,
    submitBtn: false
  }
  export const OPTION_BLOCK= {
    form: { layout: "vertical" },
    row:{gutter: 20},
    resetBtn: false,
    submitBtn: false
  }